<?php exit?>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="core/scripts/jquery.js"></script>
<script type="text/javascript">
function check_all(obj){
	$('.checkbox').each(function(){
		$(this).attr('checked',obj.checked);
	});
}
function tab(no,count){
	for (var i=0;i<count ;i++ ){
		$('#tab_'+i).removeClass('hover');
		$('#content_'+i).hide();
	}
	$('#tab_'+no).addClass('hover');
	$('#content_'+no).show();
}
function back(){
	window.history.back();
}
$(function(){
	$('#clear_cache').click(function(){
		$.ajax({
			type:'GET',
			url:'?do=clear_cache',
			success:function(){
				show_tip('缓存清空完毕！',2,300);
			}
		})
	});
	$('#create_index').click(function(){
		$.ajax({
			type:'GET',
			url:'?do=create_index',
			success:function(){
				show_tip('首页生成完毕！',2,300);
			}
		})
	});

	$('#cancel').click(function(){
		back();
	});
	function show_tip(html,time,width){
		var x=($(document).width()-width)/2;
		var y=$(document).height()/2-200;
		var div=$('#tip').css({left:x+'px',top:y+'px',width:width+'px'}).fadeIn("slow");
			$('body').append(div);
			div.html(html);
		   setTimeout(function(){
				div.fadeOut('slow');
		   },time*1000);
	}
});
</script>
<style type="text/css">
*{margin:0px;padding:0px;font-size:12px;font-family:"Microsoft Yahei","Tahoma";}
body{min-width:400px;padding:40px 5px 5px 100px;font-size:12px;background:#111;color:#999;}
img{border:0}
a{text-decoration:none;color:#ccc;}
a:hover{text-decoration:underline;color:#B5D53B;}
ol,ul{list-style-type:none;}
input,textarea{outline:0;resize:none;}
label{cursor:pointer}
/*常用样式*/
.input{border:2px solid #444;background:#fff;padding:5px;color:#000;}
.input:focus{background:#f0ebaf}
.input_read{border:none;background:transparent;padding:5px;color:#fff;}
.textarea{border:2px solid #444;background:#fff;padding:5px;overflow:auto;color:#000;}
.textarea:focus{background:#f0ebaf}
.light{
	border-color:rgba(247,243,204,.5)!important;
	box-shadow:0 0 8px rgba(247,243,204,.5);
	-moz-box-shadow:0 0 8px rgba(247,243,204,.5);
	-webkit-box-shadow:0 0 8px rgba(247,243,204,.5);
}
.blank{padding:3px;}
.comment{color:#999}
.button{
	margin-right:3px;
	margin-top:3px;
	margin-bottom:3px;
	padding:5px 15px;
	+padding:5px 8px;
	display:inline-block;
	+zoom:1;
	text-decoration:none;
	border:none;
	background:#444;
	color:#fff;

	border-radius:5px;
	-webkit-transition:all;
	-webkit-transition-timing-function:ease-out;
	-webkit-transition-duration:200ms;
	-ms-transition:all;
	-ms-transition-timing-function:ease-out;
	-ms-transition-duration:200ms;
	-moz-transition:all;
	-moz-transition-timing-function:ease-out;
	-moz-transition-duration:200ms;
}
.button:hover{
	text-decoration:none;
	background:#F5D57D;
	color:#9F8227;
}
.color-white{color:#eee}
.color-green{color:#B5D53B}
.color-red{color:#FF8B1D}
.clear{clear:both}
.clearleft{clear:left}
.clearright{clear:right}
/*LOGO*/
#logo{position:absolute;left:20px;top:5px;padding:5px;font-size:16px;font-weight:bold;text-decoration:none;color:#cdcdcd}
#logo:hover{color:#fff}
/*管理员信息*/
#info{position:absolute;right:5px;top:5px;padding:5px 10px;background:#222;border-radius:5px;}
#info span{font-weight:bold;color:#7BA927}
/*菜单样式*/
#menu{position:absolute;left:5px;top:40px;width:90px;}
#menu dl{padding:4px;background:#222;border-radius:5px;}
#menu dl dt{border-radius:5px;padding:6px 0;text-align:center;font-size:14px;font-weight:bold;background:#333;color:#fff;cursor:pointer}
#menu dl dd{text-align:center;padding:3px;}
#menu dl a{text-decoration:none;color:#eee}
#menu dl a:hover{color:#B5D53B;}
#menu dl a.hover{font-weight:bold;color:#B5D53B;}
/*位置*/
#here{margin:0 5px;padding:8px 10px;background:#222;border-radius:5px;}
/*布局*/
.layout{padding:4px;background:#222;border-radius:5px;}
.layout-box{padding:4px;background:#222;border-radius:5px;}
.layout-title{border-radius:5px;padding:6px;text-align:center;font-size:14px;font-weight:bold;background:#333;color:#fff;}
.layout-body{padding:3px;}
.layout-body li{padding:6px;}
.layout-body li:hover{background:#2f2f2f;border-radius:5px;}
/*分页*/
.pager a{text-decoration:none;background:#333;border-radius:5px;padding:2px 10px;font-size:12px;color:#999}
.pager a:hover{background:#666;color:#fff}
.pager a.hover{background:#666;color:#fff}
.pager span{background:#FFF;border-radius:5px;padding:2px 10px;font-size:12px;color:#555}
.pager span.current{font-weight:bold;background:#80AF4E;color:#fff}
/*表格*/
.table{width:100%;}
.table thead{background:#333;border-radius:5px;}
.table thead th{height:30px;color:#eee;}
.table tbody td{height:30px;}
.table tbody tr:hover{background:#252525}
.table tbody .avatar{width:20px;height:20px;}
.table tfoot{background:#333;}
.table tfoot td{height:30px;color:#eee}
/*TAB*/
#tab{height:30px;}
#tab a{display:block-inline;+zoom:1;+height:18px;+overflow:hidden;border-radius:5px;padding:5px 12px;text-decoration:none;background:#333;color:#fff}
#tab a.hover{text-decoration:none;background:#F5D57D;color:#880D02}
.tab_content{}
fieldset{border:1px solid #333;margin:5px;padding:5px 10px;}
fieldset legend{padding:0 5px;font-weight:bold;color:#B5D536}
fieldset div{margin:0 5px;height:22px;}
.unsafetip{font-weight:bold;margin-bottom:5px;padding:8px;background:#F6EDAB;border-radius:5px;color:#ff0202;display:none}
b.note{color:#B5D53B}
#tip{display:none;position:absolute;right:20px;top:20px;padding:10px;text-align:center;border-radius:5px;font:normal 12px Microsoft Yahei;background:#D8D26D;color:#444}
b.green{color:#B5D53B}
b.red{color:#FF9727}
</style>
<title><!--{$config.title}--></title>
</head>
<body>
<div id="tip"></div>
<a id="logo" href="?do=start"><!--{$config.title}-->&#153;</a>
<div id="info">
	<span><!--{$template.session.admin_name}--></span>,欢迎您!
	<a href='?action=global&do=admin_edit&admin_id=<!--{$template.session.admin_id}-->'>修改密码</a>&nbsp;/&nbsp;<a href='javascript:;' id="clear_cache">清空缓存</a>&nbsp;/&nbsp;<a href='javascript:;' id="create_index">生成首页</a>&nbsp;/&nbsp;<a href='?do=logout'>退出</a>
</div>
<div id='menu'>
	<!--{if $leftmenu}-->
		<!--{foreach from=$leftmenu item=leftmenu}-->
			<!--{if $leftmenu.children}-->
			<dl>
			<dt onclick="$('.dd_<!--{$leftmenu.no}-->').slideToggle('fast')"><!--{$leftmenu.name}--></dt>
			<!--{foreach from=$leftmenu.children key=key item=child}-->
			<dd class="dd_<!--{$leftmenu.no}-->"><a href='<!--{$child.1}-->'
			<!--{if $template.get.action==$leftmenu.code&&$template.get.do==$key}-->class="hover"<!--{/if}-->
			<!--{if $template.get.action==$leftmenu.code&&$template.get.do==$child.code_add}-->class="hover"<!--{/if}-->
			<!--{if $template.get.action==$leftmenu.code&&$template.get.do==$child.code_edit}-->class="hover"<!--{/if}-->
			><!--{$child.0}--></a></dd>
			<!--{/foreach}-->
			</dl>
			<div class="blank"></div>
			<!--{/if}-->
		<!--{/foreach}-->
	<!--{/if}-->
</div>
